package com.firexxx.vp.domain.vp.single.mlvdata;

/**
 * @description: TODO
 * @author: zhuangzhang2
 * @date: 2020-12-30 11:22
 */
public class MlvModel {
    private byte[] modelBuffer;
    private MlvModelData msModelData;

    public MlvModelData getMlvModelData() throws Exception {
        if (this.msModelData == null) {
            this.msModelData = new MlvModelData(this.modelBuffer);
        }

        return this.msModelData;
    }

    public MlvModel() {
    }

    public MlvModel(byte[] buffer) {
        this.modelBuffer = buffer;
    }

    public byte[] getModelBuffer() {
        return this.modelBuffer;
    }

    public void setModelBuffer(byte[] modelBuffer) {
        this.modelBuffer = modelBuffer;
    }

    public boolean isValidObject() {
        return this.getModelBuffer() != null && this.getModelBuffer().length > 0;
    }
}
